﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_City_ManagePro : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    public void PopulateShengList()
    {
        //Lv_Sheng.DataSource = Provience.GetAll();
        //Lv_Sheng.DataBind();
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        //Provience objPro = new Provience();
        //objPro.Name = txtSheng.Text.Trim();
        //objPro.Add();
    }
    protected void Pager_PreRender(object sender, EventArgs e)
    {
        if (Lv_Sheng.Items.Count == 0)
            PopulateShengList();
    }
    protected void Lv_Sheng_ItemCanceling(object sender, ListViewCancelEventArgs e)
    {
        Lv_Sheng.EditIndex = -1;
        PopulateShengList();
    }
    protected void Lv_Sheng_ItemDeleting(object sender, ListViewDeleteEventArgs e)
    {
        //Provience.Delete(DongDong.Common.Misc.ConvertToInt(Lv_Sheng.DataKeys[e.ItemIndex].Value));
        //PopulateShengList();
    }
    protected void Lv_Sheng_ItemUpdating(object sender, ListViewUpdateEventArgs e)
    {
        //int ShengID = DongDong.Common.Misc.ConvertToInt(Lv_Sheng.DataKeys[e.ItemIndex].Value);
        //Provience objType = Provience.Get(ShengID);
        //var item = Lv_Sheng.Items[e.ItemIndex];
        //TextBox txtEditTitle = (TextBox)item.FindControl("txtEditTitle");
        //objType.Name = txtEditTitle.Text;

        //objType.Update();
        //Lv_Sheng.EditIndex = -1;
        //PopulateShengList();
    }
    protected void Lv_Sheng_PagePropertiesChanged(object sender, EventArgs e)
    {

        PopulateShengList();
    }
    protected void Lv_Sheng_ItemEditing(object sender, ListViewEditEventArgs e)
    {
        Lv_Sheng.EditIndex = e.NewEditIndex;
        PopulateShengList();
    }
}